﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SimulationPTSystem.DAL
{
    /// <summary>
    /// 模拟实战训练系统Context
    /// </summary>
    public class SimulationPTContext:DbContext
    {
        private static SimulationPTContext _instance;
        /// <summary>
        /// 唯一实例
        /// </summary>
        public static SimulationPTContext Instance
        {
            get
            {
                if (_instance == null)
                    _instance = new SimulationPTContext();
                return _instance;
            }
        }

        protected SimulationPTContext() { }
        /// <summary>
        /// 管理员信息
        /// </summary>
        public DbSet<AdminInfo> AdminInfo { get; set; }
        /// <summary>
        /// 人员信息
        /// </summary>
        public DbSet<ChengYuanInfo> ChengYuanInfo { get; set; }
        /// <summary>
        /// 人员训练记录
        /// </summary>
        public DbSet<ChengYuanTrainingRec> ChengYuanTrainingRec { get; set; }
        /// <summary>
        /// 团队信息
        /// </summary>
        public DbSet<TeamInfo> TeamInfo { get; set; }
        /// <summary>
        /// 团队训练记录
        /// </summary>
        public DbSet<TeamTrainingRec> TeamTrainingRec { get; set; }
        /// <summary>
        /// 当前训练团队信息
        /// </summary>
        public DbSet<CurrentTrainingTeamInfo> CurrentTrainingTeamInfo { get; set; }

        public DbSet<ItemBank> ItemBank { get; set; }
        public DbSet<ZoneItemBank> ZoneItemBank { get; set; }
    }
}
